

import { serviceSimple } from "@/api"
export default{
    namespaced:true,
    actions:{
        //获取search列表
        async getSearchList({commit},params={url:'/list',data:{},method:'post'}){
            const res=await serviceSimple(params)
       
            commit('GETSEARCHLIST',res.data.data)
         }
    },

    mutations:{
        GETSEARCHLIST(state,SearchList){
            state.SearchList=SearchList
           
        }
    },
   
    state:{
        SearchList:{}
    },
    getters:{
        goodsList(state){
            return state.SearchList.goodsList||[]
        },
        attrsList(state){
            return state.SearchList.attrsList||[]
        },
        trademarkList(state){
            return state.SearchList.trademarkList||[] 
        },
        total(state){
            return state.SearchList.total
        },
        totalPages(state){
            return state.SearchList.totalPages
        },
        pageSize(state){
            return state.SearchList.pageSize
        }

        


    }
} 